﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BLO;
using Microsoft.Reporting.WinForms;

namespace QuanLyBanHang
{
    public partial class frmReportDemo : Form
    {
        public frmReportDemo()
        {
            InitializeComponent();
        }

        private void frmReportDemo_Load(object sender, EventArgs e)
        {

            this.reportViewer1.RefreshReport();
        }

        private void reportViewer1_Load(object sender, EventArgs e)
        {
             ReportDataSource reportDs = new ReportDataSource("DoanhThuDs", new HoaDonBan_Blo().GetDoanhThu("NV2", 1).Tables[0]);
             reportViewer1.ProcessingMode = ProcessingMode.Local;
             reportViewer1.LocalReport.DataSources.Add(reportDs);
             reportViewer1.LocalReport.Refresh();
        }
    }
}
